package com.sgcc.csc.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author admin
 */

public enum XxbLxTypes {


    NF_FZX("1001", "南方分中心"),

    BF_FZX("1002", "北方分中心");


    /**
     * 状态代码
     */
    private final String code;
    /**
     * 类型名称
     */
    private final String alias;


    private static final Map<String, XxbLxTypes> TYPES_MAP = new HashMap<>();
    static {
        for (XxbLxTypes attendType : XxbLxTypes.values()) {
            TYPES_MAP.put(attendType.getCode(), attendType);
        }
    }

    XxbLxTypes(String code, String alias) {
        this.code = code;
        this.alias = alias;
    }

    public String getCode() {
        return code;
    }

    public String getAlias() {
        return alias;
    }

    public static XxbLxTypes ofCode(String code){
        return TYPES_MAP.get(code);
    }
}
